User blog:King Dragonhoff/Editing/Templates
Templates are pages in the Template Namespace that are transcluded into multiple content pages. When a template is transcluded, the template page is copied onto the page. Templates can also be used to process inputs and display different results using parameters. Template Mark-ups The basic template Wikitext mark-up is the template's name surrounded by two curly brackets. Example: Templates can also have parameters which are inputs that are processed by the template to change how it displays. If a template has parameters, they will be listed on the template's documentation on its page. Parameters are separated from the template name and each other by pipes [|]. The parameter name/number (if applicable) is separated from the actual input by an equal sign =. Parameters can be named or unnamed. Examples: This template has a named parameter called "level": This template has two named parameters called "RES" and "SIZE": This template has an unnamed parameter: This template has two unnamed parameters: Parameters do not need to be listed inline. This markup... ...is equivalent to this markup: Important Templates Below are lists of templates that we use frequently here. If you want to learn more about what a specific template does, visit that template's page by clicking the link. There, you will find the template's documentation. Article Management These templates are posted at the top of a page to classify it. Each one creates a large banner and places the affected page into a category. :See Article management templates Images and Decoration These templates are used to make pages look their best. *Template:CollapsibleContent - creates a box that can be clicked to expand/collapse content *Template:No Image - posts a placeholder image *Template:Res - used to post and regulate icon images *Template:NavButton - used to create buttons that serve as links to pages *Template:LinkBox - used to create a banner that links to another page *Template:Hero Abilities Section - used to create a standard "Hero Abilities" section on Hero pages. *Template:UpgradeProgression and Template:Placard - used to create the Upgrade Progression found at the bottom of each troop page. *Template:Plaque - adds a plaque in place of a main image to specific pages *Template:TroopCard - creates a troop card that calculates capabilities and displays other general information about a specific troop *Template:BarGraph - used to create a bar graph to display data *Template:PortionChart - used to create a chart that illustrates parts of a whole Fun These templates are used mostly on User pages for fun. *Template:MyProfile/Template:AutoProfile - displays the levels of your in-game units *Template:MyAchievements/Template:AutoAchievements - displays your in-game achievements *Template:Xplvl - creates an Experience level badge *Template:USERNAME - displays the username of the user viewing the page *Template:Quiz - used to create a quiz *Template:GradientText - used to make text with a gradient *Template:Countdown - used to create a countdown timer Math These templates are used to do math. They are mostly used for calculators or tables. *Template:Addup - used to display cumulative data *Template:Sqrt - returns the square root of a number *Template:Root - returns the nth root of a number *Template:NextEven - returns the next even number above the given number *Template:Cumulative - returns the cumulative energy cost of a Gunboat Weapon *Template:WeaponryShots - returns the maximum number of shots of a certain Gunboat Weapon that can be fired with a given amount of energy Lookups Lookup templates are used within calculators and other templates to provide the statistics of in-game units to them. These templates are located in Category:Lookup Templates. All of these templates have only one named parameter. That parameter is "level" for most of the these lookups. The following Lookups use parameters other than "level": *Category:General Troop Lookups - Parameter: "troop" *Category:Prototype Lookups - Parameter: "mark" CSS Shortcuts These templates help when writing CSS in elements. These templates allow you to enter information for a CSS property once and have the template automatically reproduce that property with all compatibility prefixes. *Template:Valign - used to vertically align text inside of an element *Template:Scale - used for the scale property *Template:Border-radius - used for the border-radius property *The tool located here makes it easy to build CSS gradients using all compatibility formats. Other *Template:Protection - places a stoplight at the top of the page that shows that page's protection level *Template:MagicWords - inserts the NOTOC and NOEDITSECTION magic words into pages *Template:Documentation - used on template pages (inside noinclude tags) to display information about how to use that template *Template:InvisHeader - creates an invisible header that can be linked to *Template:Help - creates a small icon that can be clicked or hovered over to offer help about something on a page Category:Blog posts